package com.dbgs.insurance.insuredperson;

import android.app.Application;
import android.content.Context;

import com.baidu.mapapi.SDKInitializer;
import com.blankj.utilcode.util.Utils;
import com.dbgs.insurance.insuredperson.cache.GlobalCache;
import com.jude.beam.Beam;

/**
 * Created by Administrator on 2018/4/17.
 */

public class MyApplication extends Application {

    private static MyApplication mInstance;

    public static MyApplication getInstance() {

        return mInstance;
    }
    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
    }

    @Override
    public void onCreate() {
        super.onCreate();
        mInstance = this;
        GlobalCache.getInstance().init(this);

        Beam.init(this);
        initBaidu();
        Utils.init(this);
       // ApiManager.getInstance().init(BuildConfig.URL, BuildConfig.DEBUG);//BuildConfig.DEBUG? ConstStr.RELEASE_URL:
//        initJpush();
    }

    private void initBaidu(){
        // 在使用 SDK 各组间之前初始化 context 信息，传入 ApplicationContext
        SDKInitializer.initialize(this);
    }

//    void initJpush() {
//        JPushInterface.setDebugMode(BuildConfig.DEBUG);    // 设置开启日志,发布时请关闭日志
//        JPushInterface.init(this);            // 初始化 JPush
//        BasicPushNotificationBuilder build = new BasicPushNotificationBuilder(this);
//        build.statusBarDrawable = R.mipmap.ic_launcher;
//        JPushInterface.setDefaultPushNotificationBuilder(build);
//    }

}

